<form name="searchForms">
    First name: <input type="text" name="name" onkeyup="queryDB('searchForms','{$page->getPageName()}')"/><br />
    Last name: <input type="text" name="surname" onkeyup="queryDB('searchForms','{$page->getPageName()}')" />
    <input type="button" name="action" value="Szukaj"  />
</form>
<div id="grid">
    <table>
        <tr>
            <td>ID</td><td>Imię</td><td>Nazwisko</td><td>Email</td>
        </tr>
{foreach from=$clients key=myId item=i}
{strip}
        <tr bgcolor="{cycle values="#aaaaaa,#bbbbbb"}">
            <td>{$i.client_id}</td>
            <td>{$i.name}</td>
            <td>{$i.surname}</td>
            <td>{$i.email}</td>
        </tr>
{/strip}
{/foreach}
    </table>
{$page->getPage()}
    <form name="actionForm" action="index.php" method="POST">
        <input type="hidden" name="source" value="{$page->getPageName()}"/>
        <input type="hidden" name="page" value="{$page->getPage()}"/>
        <input type="submit" name="action" value="Next" />

        <input type="submit" name="action" value="Previous" />

    </form>
</div>